package cn.itsource.controller.remote;

import cn.dev33.satoken.annotation.SaIgnore;
import cn.itsource.api.openfeign.ILoginApiToService;
import cn.itsource.pojo.dto.LoginRo;
import cn.itsource.pojo.dto.LoginRoToLongin;
import cn.itsource.result.JSONResult;
import cn.itsource.service.ILoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

@RestController
@SaIgnore
public class LoginOpenFeignClientImpl implements ILoginApiToService {

    @Autowired
    private ILoginService loginService;

    @Override
    public JSONResult saveLogin(LoginRo loginRo) {
        loginService.save(LoginRoToLongin.LoginRoToLongin(loginRo));
        return JSONResult.success();
    }
}
